05. Error Handling with NY Times

Error Handling with NY Times

Question:

Start Quiz:

Solution:

INSTRUCTOR NOTE:

jQuery .error() documentation

Read up on .error() here.

NOTE: As of jQuery 1.8, .error() is deprecated. Use .fail() instead.

Chaining

What's "chaining," you ask? It's when you attach a method to the end of another method. For instance:

var string1 = "hello";
var string2 = string1.slice(0,1).toUpperCase();
console.log(string2);     // "H"

Here, I chain toUpperCase() to the result of string1.slice(0,1). string1.slice(0,1) returns h and .toUpperCase() turns the h into an H.